entry: Avoid criticals
authorMatthias Clasen <mclasen@redhat.com>
Mon, 8 Jun 2015 23:04:06 +0000 (19:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 8 Jun 2015 23:04:06 +0000 (19:04 -0400)
After the recent changes, we could end up calling
gtk_entry_update_handles in cases where the text_handle
has not be created (e.g. when dragging text from an entry).
Avoid that.

gtk/gtkentry.c

index c617a92a772d30539b635dcfa2cb5b5e063484af..eb83363c473b3ddc4c98102015562906d4bad8c5 100644 (file)
@@ -4574,7 +4574,8 @@ gtk_entry_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
       gtk_gesture_set_state (priv->drag_gesture,
                              GTK_EVENT_SEQUENCE_CLAIMED);
 
-      gtk_entry_update_handles (entry, mode);
+      if (priv->text_handle)
+        gtk_entry_update_handles (entry, mode);
     }
 
   if (n_press >= 3)